from ztools import tprint
from ztools import AnsiStyle as style
from ztools import AnsiFore as fore
from ztools import AnsiBack as back

tp = tprint()

print("-----")
tp.color("123", style.underline, fore.red, back.white)
tp.flush()
tp.color("123", style.underline, fore.red)
tp.flush()
tp.color("123", style.underline, back.white)
tp.flush()
tp.color("123", style.underline)
tp.flush()
tp.color("123")
tp.flush()

print("-----")
tp.color("123", fore.red, back.white)
tp.flush()
tp.color("123", fore.red)
tp.flush()
tp.color("123", back.white)
tp.flush()
tp.color("123")
tp.flush()

print("-----")
tp.color(123, fore.red, back.white)
tp.flush()
tp.color(123, fore.red)
tp.flush()
tp.color(123, back.white)
tp.flush()
tp.color(123)
tp.flush()

print("-----")
tp.color((1,2,3), fore.red, back.white)
tp.flush()
tp.color((1,2,3), fore.red)
tp.flush()
tp.color((1,2,3), back.white)
tp.flush()
tp.color((1,2,3))
tp.flush()

print("-----")
tp.color([1,2,3], fore.red, back.white)
tp.flush()
tp.color([1,2,3], fore.red)
tp.flush()
tp.color([1,2,3], back.white)
tp.flush()
tp.color([1,2,3])
tp.flush()

print("-----")
tp.color({'k1':1, 'k2':2, 'k3':3}, fore.red, back.white)
tp.flush()
tp.color({'k1':1, 'k2':2, 'k3':3}, fore.red)
tp.flush()
tp.color({'k1':1, 'k2':2, 'k3':3}, back.white)
tp.flush()
tp.color({'k1':1, 'k2':2, 'k3':3})
tp.flush()

input("按回车（Enter）继续")

